home *** CD-ROM | disk | FTP | other *** search
/ Megahits 5 / Megahits 5 (1994)(GTI - Rhein-Main-Soft)(DE)(Disc 2 of 2)[!].iso / archive / print / hwgpostbeta2.lha / HWGPOST / init.ps < prev    next >
Encoding:
Text File  |  1994-06-03  |  2.8 KB  |  117 lines

  1. %! HWGPOST >= V22.10 initialisation file
  2. %
  3. % $Id: init.ps,v 2.8 1994/06/03 08:40:03 heinz Exp $
  4. %
  5. % Based in part on Post V1.7
  6. % (C) Adrian Aylward 1989, 1991
  7. %
  8. % HWGPOST ©1993,1994 Heinz Wrobel, for Joan Thuesen
  9. %
  10. % You may freely copy, use, and modify this file
  11. %
  12. % This file should be run before most programs
  13.  
  14. % A dummy status dictionary
  15. false setglobal
  16. /statusdict <<
  17. /waittimeout 0
  18. /checkpassword { 0 eq } bind
  19. /product product
  20. /processcolors deviceinfo /Colors get
  21. >> def
  22. true setglobal
  23.  
  24. % A dummy server dictionary
  25.  
  26. /serverdict << /exitserver { pop } bind >> def
  27.  
  28. % We need global VM for modifications to systemdict!
  29. true setglobal
  30. systemdict begin
  31.  
  32. % Ignore CTRL/D, CTRL/L, and simple CRs
  33.  
  34. <04> cvn {} def
  35. <0c> cvn {} def
  36. <0d> cvn {} def
  37.  
  38. % Dummies for ugly PostScript code
  39.  
  40. /setjobtimeout { pop } bind def
  41. /letter {} bind def
  42.  
  43. % Ok, lets return to the previous vm mode and make the systemdict readonly
  44. end
  45. systemdict readonly pop
  46. false setglobal
  47.  
  48. % We need to register all our resources on disk now. Otherwise HWGPOST
  49. % won't find any fonts!
  50. % We look for the file "HWGPOSTResources" and execute it if it is available
  51. % If not, we check for it as "POST:HWGPOSTResources", too.
  52. % if this fails again, we can't do anything reasonable about it so we don't.
  53. (HWGPOSTResources) dup status
  54.     {pop pop pop pop true}
  55.     {pop
  56.      (%POST%HWGPOSTResources) dup status
  57.         {pop pop pop pop true}
  58.         {pop false}
  59.      ifelse
  60.     }
  61. ifelse
  62. {
  63.     currentglobal exch true setglobal
  64.     run
  65.     setglobal
  66. }
  67. if
  68.  
  69. % Ok, we now go to local VM for user stuff
  70. false setglobal
  71.  
  72. %
  73. % To keep compatibility with the old post.library I need to have
  74. % the renderband commands available. I don't want them to "clutter"
  75. % the PS name space by default, so they are built in as "@currentband"
  76. % and "@setband" and need to be redefined for "old" SW.
  77. %
  78. % I encourage any user of HWGPOST to use the "@" names for these operators
  79. % as I might drop support for the old names in init.ps in the future.
  80. %
  81. /currentband /@currentband load def
  82. /setband /@setband load def
  83.  
  84. % Define a dummy font - prints out big dots ...
  85. % This dummy font is in local VM
  86.  
  87. /DummyFont 10 dict dup begin
  88. /FontName /DummyFont def
  89. /FontMatrix [0.001 0 0 0.001 0 0] def
  90. /FontType 3 def
  91. /FontBBox [0 -300 500 700] def
  92. /Encoding StandardEncoding def
  93. /BuildChar
  94. { pop pop
  95.   500 0 50 0 450 400 setcachedevice
  96.   250 200 200 0 360 arc fill
  97. } bind def
  98. /Painttype 0 def
  99. end definefont pop
  100. %
  101. % Establish the dummy font as the default, as some fonts need it to
  102. % define themselves.
  103. %
  104. /DefaultFontName /DummyFont def
  105.  
  106. % Uncomment the following line to use FunkyFont as the default font
  107. %/DefaultFontName /FunkyFont def
  108.  
  109. % Uncomment the following line to use Courier as the default font
  110. %/DefaultFontName /Courier def
  111.  
  112. % Just to be sure we start fresh. Actually there should
  113. % be no need to do this as it would indicate an error condition anyway.
  114. cleardictstack
  115.  
  116. % EOT
  117.